set the visible of card field "Source" to not the visible of card field "Source"
if the visible of card field "Source" is true then
set the name of me to "Hide LSP Source"
else set the name of me to "Show LSP Source"
end mouseUp
-- part contents for background part 16
----- text -----
FILETOFIELD XCMD version 1.2
Kevin Calhoun
The FileToField XCMD allows you to copy the contents of a text file into a HyperCard field. You may choose the text file to copy from by selecting it from a standard file dialog box or by specifying its full pathname.
If the text file is too large (just under 30K is the practical limit for HyperCard fields), FileToField won't try to copy it into the field. If this or any other error occurs, FileToField will return an error message as the result. Word 1 of this message will be "Error". If the text was copied successfully, FileToField returns the full pathname of the file as the result.
INVOKING FILETOFIELD
You may designate the field into which the text is to be copied in any way considered valid by HyperCard, by number, id, or name, with one exception: you can't use the field's name if it is more than one word. If you do use the field's name, don't put the field name in quotation marks. Nested quotations confuse HyperCard. (See the examples below.)
If you don't supply the pathname of the file to be copied from, FileToField will invoke SFGetFile, and the user can select the file from the dialog box. If the user pushes the cancel buton of the dialog box, FileToField returns "Cancel" as the Result.
FileToField fieldDesignation,<full pathname of file>
examples--
FileToField("card field 1") --these examples copy files chosen from the
FileToField("bkgnd field id 16") --standard file dialog into the specified field
FileToField("card field Memorex")
FileToField "field 5","OldAchesAndPains:Good Stuff:Secrets" --this copies the file
"Secrets" into background field 5.
REVISION HISTORY
7 March 1988: release of version 1.0
31 March 1988: release of version 1.1
--better reporting of memory errors
--more compact code
16 May 1988: release of version 1.2
-- fixed bug that bombed MacPlus (switched from PBHOpen to FSOpen)